Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run isort as pre-commit hook #2721

Merged

Conversation

janfabry
Copy link
Contributor

@janfabry janfabry commented Aug 4, 2020

Run it before flake8, so any errors will get fixed automatically.

Fixes #2711

Should we also remove flake8-isort from the flake8 check? And remove the flake8-isort requirement?

It's not clear to me yet whether pre-commit runs and installs its hooks in the same environment you are using, or in a separate virtualenv, so I don't know if it is an issue someone already has an older isort installed.

Run it before flake8, so any errors will get fixed automatically.

Fixes cookiecutter#2711
Add myself, and fix link to @sorasful
@browniebroke
Copy link
Member

Should we also remove flake8-isort from the flake8 check?

We could, yes. Don't see a problem to keep it around, but maybe it is?

And remove the flake8-isort requirement?

I think it's best to keep it around for now.

It's not clear to me yet whether pre-commit runs and installs its hooks in the same environment you are using, or in a separate virtualenv

It's installing each hook in a separate virtualenv.

@browniebroke
Copy link
Member

Going to merge this, it's a good improvement. Feel free to send another one if you see some issues with having flake8-isort along with flake8 pre-commit hook.

@browniebroke browniebroke merged commit 5a3266f into cookiecutter:master Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Short project name causes failure in flake8-isort
2 participants